﻿<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:Hinshelwood.TFSHeatITSM"
  xmlns:Controlers="clr-namespace:Hinshelwood.TFSHeatITSM.Controlers"
  Background="{DynamicResource MainBackgroundBrush}"
  x:Class="MainWindow"
  Title="TFS Heat ITSM" Height="600" Width="800"
  ResizeMode="CanResizeWithGrip"
  Icon="RDIcon.ico">
    <Window.Resources>

        <!-- Animation for showing the Item Info control -->
        <!--<Storyboard x:Key="ShowItemInfo" Completed="ShowItemInfo_StoryboardCompleted">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemInfoControl" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemInfoControl" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>-->

        <!-- Animation for hiding the Item Info control -->
        <!--<Storyboard x:Key="HideItemInfo" Completed="HideItemInfo_StoryboardCompleted">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ItemInfoControl">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemInfoControl" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Hidden}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>-->

        <!-- Animation for showing the Family Data control -->
        <!--<Storyboard x:Key="ShowFamilyData" Completed="ShowFamilyData_StoryboardCompleted">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FamilyDataControl" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FamilyDataControl" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>-->

        <!-- Animation for hiding the Family Data control -->
        <!--<Storyboard x:Key="HideFamilyData" Completed="HideFamilyData_StoryboardCompleted">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FamilyDataControl">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FamilyDataControl" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Hidden}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>-->

        <!-- Animation for showing the Working control -->
        <!--<Storyboard x:Key="ShowWorkingControl" Completed="ShowWorking_StoryboardCompleted">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="WorkingUserControl">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="WorkingUserControl" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Hidden}"/>
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>-->

        <!-- Animation for hiding the Working control -->
        <!--<Storyboard x:Key="HideWorkingControl" Completed="HideWorking_StoryboardCompleted">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="WorkingUserControl">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="WorkingUserControl" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Hidden}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>-->

        <!-- Animation for showing the Credential provider control -->
        <!--<Storyboard x:Key="ShowCredentialProviderBox">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CredentialProviderBox">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CredentialProviderBox" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Hidden}"/>
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>-->

        <!-- Animation for hiding the Working control -->
        <!--<Storyboard x:Key="HideCredentialProviderBox">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CredentialProviderBox">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="CredentialProviderBox" Storyboard.TargetProperty="(UIElement.Visibility)">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Hidden}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>-->

    </Window.Resources>

    <!--Setup menu command bindings-->
    <Window.CommandBindings>
       <CommandBinding Command="Controlers:TeamSystemCommands.SelectServerCommand" Executed="SelectTeamServerCommand_Executed"/>
       <CommandBinding Command="Controlers:TeamSystemCommands.ChangeServerCommand" Executed="ChangeTeamServerCommand_Executed"/>
       <CommandBinding Command="Controlers:TeamSystemCommands.SelectProjectCommand" Executed="SelectTeamProjectCommand_Executed" CanExecute="SelectTeamProjectCommand_CanExecuted" />
       <CommandBinding Command="Controlers:TeamSystemCommands.ChangeProjectCommand" Executed="ChangeTeamProjectCommand_Executed"/>
       <CommandBinding Command="Controlers:TeamSystemCommands.SelectWorkItemTypeCommand" Executed="SelectWorkItemTypeCommand_Executed"/>
       <CommandBinding Command="Controlers:TeamSystemCommands.ChangeWorkItemTypeCommand" Executed="ChangeWorkItemTypeCommand_Executed"/>
        <CommandBinding Command="Controlers:TeamSystemCommands.CreateWorkItemCommand" Executed="CreateWorkItemCommand_Executed"/>
        <CommandBinding Command="Controlers:TeamSystemCommands.SaveWorkItemCommand" Executed="SaveWorkItemCommand_Executed"/>
        
        <CommandBinding Command="Controlers:LinksCommands.ChangeItemCommand" Executed="ChangeItemCommand_Executed"/>
        <CommandBinding Command="Controlers:LinksCommands.UpdateCallLogRefNoWithTFSId" Executed="UpdateCallLogRefNoWithTFSId_Executed"/>
        
       <CommandBinding Command="Controlers:HeatCommands.SelectConnectionCommand" Executed="SelectConnectionCommand_Executed"/>
        <CommandBinding Command="Controlers:HeatCommands.ChangeConnectionCommand" Executed="ChangeConnectionCommand_Executed"/>
        <CommandBinding Command="Controlers:HeatCommands.SelectApplicationCommand" Executed="SelectApplicationCommand_Executed" CanExecute="SelectApplicationCommand_CanExecuted"/>
        <CommandBinding Command="Controlers:HeatCommands.ChangeApplicationCommand" Executed="ChangeApplicationCommand_Executed"/>
        
        <CommandBinding Command="local:Commands.CodeplexCommand" Executed="CodeplexCommand_Executed"/>
        <CommandBinding Command="local:About.ShowAboutCommand" Executed="ShowAboutCommand_Executed"/>
        <CommandBinding Command="local:Commands.ClearSettingsCommand" Executed="ClearSettingsCommand_Executed"/>
        
       <!--  <CommandBinding Command="local:Commands.SelectSkinCommand" Executed="ChangeSkin"/>
      <CommandBinding Command="local:Commands.SelectTeamProjectCommand" Executed="ChangeTeamProject"/>
        <CommandBinding Command="local:Commands.SelectHeatITSMCommand" Executed="ChangeHeatITSM"/>
        -->
    </Window.CommandBindings>

    <DockPanel Name="MainWindowContent">

        <!-- Header Area-->
        <Border Height="50" DockPanel.Dock="Top" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1" x:Name="HeaderBorder" Padding="10,0,10,0" >
            <DockPanel x:Name="Header" >
                <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="24" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,5"><Run Foreground="#FFCFD3DA">TFS </Run><Run FontWeight="Normal">Heat ITSM</Run></TextBlock>
                <StackPanel HorizontalAlignment="Right" DockPanel.Dock="Right" Margin="0,0,0,5" VerticalAlignment="Bottom">
                    <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="24" FontStretch="Normal" FontWeight="Light" MouseLeftButtonUp="RDdotNet_MouseLeftButtonUp" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}"><Run Foreground="#FFCFD3DA" FontSize="8">Developed By</Run></TextBlock>
                    <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="24" FontStretch="Normal" FontWeight="Light" MouseLeftButtonUp="RDdotNet_MouseLeftButtonUp" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}"><Run Foreground="#FFCFD3DA" FontSize="8">Martin Hinshelwood</Run></TextBlock>
                    <Canvas Width="50.071" Height="25" Cursor="Hand" MouseLeftButtonUp="RDdotNet_MouseLeftButtonUp">
                        <Canvas.RenderTransform>
                            <ScaleTransform ScaleX="0.5" ScaleY="0.5" />
                        </Canvas.RenderTransform>
                        <Path x:Name="Path" Width="36.3173" Height="37.4427" Canvas.Left="22.0863" Canvas.Top="12.8327" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 53.0703,21.1607L 54.241,21.1607C 56.5396,21.1607 58.4036,19.3007 58.4036,17.002C 58.4036,14.7034 56.5396,12.8434 54.241,12.8434L 53.5369,12.8434L 53.4689,12.8354L 26.245,12.8327C 23.9463,12.8327 22.0863,14.6967 22.0863,16.994L 22.0863,46.1167C 22.0863,48.4141 23.9463,50.2754 26.245,50.2754C 28.5423,50.2754 30.4036,48.4141 30.4036,46.1167L 30.4036,21.1527L 52.409,21.1527L 53.0703,21.1607 Z "/>
                        <Path x:Name="Path_0" Width="28.4747" Height="8.32397" Canvas.Left="66.4674" Canvas.Top="12.8512" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 66.9407,21.1685L 88.9473,21.1685L 89.6073,21.1752L 90.7807,21.1752C 93.0794,21.1752 94.942,19.3153 94.942,17.0165C 94.942,14.7179 93.0794,12.8565 90.7807,12.8565L 90.0753,12.8565L 90.0073,12.8512L 66.4674,12.8512L 66.9407,21.1685 Z "/>
                        <Path x:Name="Path_1" Width="45.1826" Height="50.2785" Canvas.Left="62.2888" Canvas.Top="0" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 63.7675,40.3014C 63.8981,40.4187 64.0221,40.5414 64.1715,40.6427L 77.1995,49.5627C 77.9728,50.092 78.8621,50.3107 79.7542,50.2747L 103.313,50.276C 105.61,50.276 107.471,48.4147 107.471,46.1161L 107.471,4.16138C 107.471,1.8627 105.61,0 103.313,0C 101.015,0 99.1555,1.8627 99.1555,4.16138L 99.1555,41.9574L 80.8155,41.9574L 70.6088,34.968L 70.6088,17.0173C 70.6088,14.7174 68.7475,12.8546 66.4501,12.8546C 64.1515,12.8546 62.2888,14.7174 62.2888,17.0173L 62.2888,37.1454C 62.2888,38.416 62.8701,39.5387 63.7675,40.3014 Z "/>
                        <Path x:Name="Path_2" Width="7.052" Height="7.05338" Canvas.Left="0" Canvas.Top="12.8392" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 3.52267,19.8926C 5.47067,19.8926 7.052,18.3126 7.052,16.3659C 7.052,14.4152 5.47067,12.8392 3.52267,12.8392C 1.57736,12.8392 0,14.4152 0,16.3659C 0,18.3126 1.57736,19.8926 3.52267,19.8926 Z "/>
                        <Path x:Name="Path_3" Width="7.05467" Height="7.05338" Canvas.Left="9.29614" Canvas.Top="12.8392" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 12.8228,19.8926C 14.7735,19.8926 16.3508,18.3126 16.3508,16.3659C 16.3508,14.4152 14.7735,12.8392 12.8228,12.8392C 10.8775,12.8392 9.29614,14.4152 9.29614,16.3659C 9.29614,18.3126 10.8775,19.8926 12.8228,19.8926 Z "/>
                        <Path x:Name="Path_4" Width="7.052" Height="7.0546" Canvas.Left="0" Canvas.Top="22.9557" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 3.52267,30.0103C 5.47067,30.0103 7.052,28.4316 7.052,26.4836C 7.052,24.5343 5.47067,22.9557 3.52267,22.9557C 1.57736,22.9557 0,24.5343 0,26.4836C 0,28.4316 1.57736,30.0103 3.52267,30.0103 Z "/>
                        <Path x:Name="Path_5" Width="7.05467" Height="7.0546" Canvas.Left="9.29614" Canvas.Top="22.9557" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 12.8228,30.0103C 14.7735,30.0103 16.3508,28.4316 16.3508,26.4836C 16.3508,24.5343 14.7735,22.9557 12.8228,22.9557C 10.8775,22.9557 9.29614,24.5343 9.29614,26.4836C 9.29614,28.4316 10.8775,30.0103 12.8228,30.0103 Z "/>
                        <Path x:Name="Path_6" Width="7.052" Height="7.05328" Canvas.Left="0" Canvas.Top="33.0787" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 3.52267,40.132C 5.47067,40.132 7.052,38.5547 7.052,36.604C 7.052,34.6587 5.47067,33.0787 3.52267,33.0787C 1.57736,33.0787 0,34.6587 0,36.604C 0,38.5547 1.57736,40.132 3.52267,40.132 Z "/>
                        <Path x:Name="Path_7" Width="7.05467" Height="7.05328" Canvas.Left="9.29614" Canvas.Top="33.0787" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 12.8228,40.132C 14.7735,40.132 16.3508,38.5547 16.3508,36.604C 16.3508,34.6587 14.7735,33.0787 12.8228,33.0787C 10.8775,33.0787 9.29614,34.6587 9.29614,36.604C 9.29614,38.5547 10.8775,40.132 12.8228,40.132 Z "/>
                        <Path x:Name="Path_8" Width="7.05467" Height="7.056" Canvas.Left="9.29614" Canvas.Top="43.1965" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 12.8228,50.2525C 14.7735,50.2525 16.3508,48.6725 16.3508,46.7245C 16.3508,44.7779 14.7735,43.1965 12.8228,43.1965C 10.8775,43.1965 9.29614,44.7779 9.29614,46.7245C 9.29614,48.6725 10.8775,50.2525 12.8228,50.2525 Z "/>
                        <Path x:Name="Path_9" Width="7.04932" Height="7.05338" Canvas.Left="111.022" Canvas.Top="12.8392" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 114.542,19.8926C 116.492,19.8926 118.071,18.3126 118.071,16.3659C 118.071,14.4152 116.492,12.8392 114.542,12.8392C 112.596,12.8392 111.022,14.4152 111.022,16.3659C 111.022,18.3126 112.596,19.8926 114.542,19.8926 Z "/>
                    </Canvas>
                </StackPanel>
            </DockPanel>
        </Border>

        <Border Height="auto" DockPanel.Dock="Bottom" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1" x:Name="FooterBorder" Padding="10,0,10,0" >
            <DockPanel x:Name="Footer">
                <StackPanel DockPanel.Dock="Left" MinWidth="200" x:Name="uxHeatStatus">
                    <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="10" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">Heat ITSM</Run></TextBlock>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">State </Run></TextBlock>
                        <TextBlock xml:space="preserve" Foreground="Red" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="0,0,0,1" Text="{Binding Path=ConnectionState}"></TextBlock>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">Message </Run></TextBlock>
                        <TextBlock xml:space="preserve" Foreground="Red" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="0,0,0,1" Text="{Binding Path=ConnectionInfoMessage}"></TextBlock>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">Application </Run></TextBlock>
                        <TextBlock xml:space="preserve" Foreground="Red" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="0,0,0,1" Text="{Binding Path=SelectedApplication}"></TextBlock>
                    </StackPanel>
                </StackPanel>
                
                <StackPanel DockPanel.Dock="Right" MinWidth="200" x:Name="uxTeamSystemStatus">
                    <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="10" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">Visual Studio Team System</Run></TextBlock>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">Connected to </Run></TextBlock>
                        <TextBlock xml:space="preserve" Foreground="Red" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="0,0,0,1" Text="{Binding Path=SelectedServer.Name}"></TextBlock>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">Project </Run></TextBlock>
                        <TextBlock xml:space="preserve" Foreground="Red" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="0,0,0,1" Text="{Binding Path=SelectedProject.Name}"></TextBlock>
                    </StackPanel>
                </StackPanel>
                
                <StackPanel x:Name="uxLinkStatus" MinWidth="200">
                    <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="10" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">Link</Run></TextBlock>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">Processing </Run></TextBlock>
                        <TextBlock xml:space="preserve" Foreground="Red" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="0,0,0,1" Text="{Binding Path=Working}"></TextBlock>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,1"><Run Foreground="#FFCFD3DA">Items </Run></TextBlock>
                        <TextBlock xml:space="preserve" Foreground="Red" Opacity="1" FontFamily="Calibri" FontSize="8" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="0,0,0,1" Text="{Binding Path=Items.Count}"></TextBlock>
                    </StackPanel>
                </StackPanel>
            </DockPanel>
        </Border>

        <!-- Menu Area -->
        <Border x:Name="MenuBorder" VerticalAlignment="Top" HorizontalAlignment="Stretch" DockPanel.Dock="Top" Margin="0,5,0,5">
            <DockPanel>
                <StackPanel Name="SearchPanel" Opacity="0.5" IsEnabled="False" DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" FlowDirection="LeftToRight" Margin="5,0,10,0">
                    <Label VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="2">Quick Search:</Label>
                    <TextBox Name="SearchText" VerticalContentAlignment="Center" MinWidth="150">[enter search]</TextBox>
                    <Button Width="Auto" Padding="2" MinWidth="20" IsEnabled="False">Go</Button>
                </StackPanel>
                <Menu VerticalAlignment="Bottom" Margin="5,0,0,0" Style="{DynamicResource MenuStyle}">
                    <MenuItem Header="Team System" x:Name="uxTSMenu" Style="{DynamicResource MenuItemStyle}">
                        <MenuItem x:Name="uxTSMenuChangeServer" Command="Controlers:TeamSystemCommands.SelectServerCommand" Style="{DynamicResource MenuItemStyle}">
                            <MenuItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="pack://application:,,/Resources/Images/TeamServerSelectIcon.png"></Image>
                                    <TextBlock Padding="5,0,0,0" VerticalAlignment="Center">Change Server</TextBlock>
                                </StackPanel>
                            </MenuItem.Header>
                        </MenuItem>
                        <MenuItem x:Name="uxTSMenuChangeProject" Command="Controlers:TeamSystemCommands.SelectProjectCommand" Style="{DynamicResource MenuItemStyle}" >
                            <MenuItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="pack://application:,,/Resources/Images/TeamProjectSelectIcon.png"></Image>
                                    <TextBlock Padding="5,0,0,0" VerticalAlignment="Center">Change Project</TextBlock>
                                </StackPanel>
                            </MenuItem.Header>
                        </MenuItem>
                    </MenuItem>
                    <MenuItem Header="Heat ITSM" x:Name="uxHITSMMenu" Style="{DynamicResource MenuItemStyle}">
                        <MenuItem Header="Change Data Source" Command="Controlers:HeatCommands.SelectConnectionCommand" Style="{DynamicResource MenuItemStyle}" />
                        <MenuItem Header="Change Application" Command="Controlers:HeatCommands.SelectApplicationCommand" Style="{DynamicResource MenuItemStyle}" />
                    </MenuItem>
                    <MenuItem HorizontalAlignment="Right" Header="View" x:Name="ViewMenu" Style="{DynamicResource MenuItemStyle}">
                        <MenuItem Header="Change Skin" Command="local:Commands.SelectSkinCommand"  IsEnabled="True" Style="{DynamicResource MenuItemStyle}" />
                    </MenuItem>
                    <MenuItem HorizontalAlignment="Right" Header="_Help" x:Name="CodeplexMenu" Style="{DynamicResource MenuItemStyle}">
                        <MenuItem Header="About" Command="local:About.ShowAboutCommand" IsEnabled="True" Style="{DynamicResource MenuItemStyle}" />
                        <MenuItem Header="View latest release" Command="local:Commands.CodeplexCommand" CommandParameter="Release" IsEnabled="True" Style="{DynamicResource MenuItemStyle}" />
                        <MenuItem Header="Online Help" Command="local:Commands.CodeplexCommand" CommandParameter="Discussions" IsEnabled="True" Style="{DynamicResource MenuItemStyle}" />
                        <MenuItem Header="Submit a Bug" Command="local:Commands.CodeplexCommand" CommandParameter="IssueTracker" IsEnabled="True" Style="{DynamicResource MenuItemStyle}" />
                        <MenuItem Header="Download latest source code" Command="local:Commands.CodeplexCommand" CommandParameter="SourceCode" IsEnabled="True" Style="{DynamicResource MenuItemStyle}" />
                        <MenuItem Header="View license" Command="local:Commands.CodeplexCommand" IsEnabled="True" CommandParameter="License" Style="{DynamicResource MenuItemStyle}" />
                        <MenuItem Header="Reset User Settings" Command="local:Commands.ClearSettingsCommand" IsEnabled="True" Style="{DynamicResource MenuItemStyle}" />
                    </MenuItem>
                </Menu>
            </DockPanel>            
        </Border>

        <Grid x:Name="MainGrid" Grid.IsSharedSizeScope="True" DockPanel.Dock="Top" >

            <!-- Diagram Area -->
            <Grid x:Name="DiagramPane" Margin="10,0,10,5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <!-- The column 1 clone is used when the details area is collapsed -->
                    <ColumnDefinition x:Name="column1CloneForLayer0" SharedSizeGroup="column1"/>
                </Grid.ColumnDefinitions>
                <Border Background="{DynamicResource DiagramGradientBrush}" Style="{DynamicResource BorderStyle}" x:Name="DiagramBorder">
                    <local:HeatList x:Name="uxHeatList"  Margin="5,0,0,0"  />
                    
                    <!--<local:DiagramViewer x:Name="DiagramControl" Zoom="1.5" />-->
                </Border>
            </Grid>
            <local:About x:Name="uxAbout" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" />
            <local:SelectTeamServer x:Name="uxSelectTeamServer" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" />
           <local:CredentialProviderBox  x:Name="uxCredentialProviderBox" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" />
           <local:SelectTeamProject  x:Name="uxSelectTeamProject" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" />
           <local:SelectHeatConnection  x:Name="uxSelectHeatConnection"  HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" />
           <local:SelectHeatApplication  x:Name="uxSelectHeatApplication" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" />
           <local:SelectWorkItemType  x:Name="uxSelectWorkItemType" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden" />
           <local:CreateWorkItem x:Name="uxCreateWorkItem" Visibility="Hidden" />
        </Grid>
       

        
        
    </DockPanel>
</Window>
